package com.futureCloudMOM.core.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.futureCloudMOM.core.entity.FBaseEntity;
import com.futureCloudMOM.framework.dict.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Basic_Reason", description = "异常原因表")
@TableName(value = "Basic_Reason")
public class BasicReason extends FBaseEntity implements Serializable {



    @NotNull(message="[工序ID]不能为空")
    @ApiModelProperty("工序ID")
    @TableField(value = "processId")
    @Dict(dictCode = "id",dictText = "name",dictTable = "Basic_process")
    private Long processId;

    @NotNull(message="[异常原因类型]不能为空")
    @ApiModelProperty("异常原因类型")
    @TableField(value = "reasonTypeId")
    @Dict(dictCode = "id",dictText = "name",dictTable = "Basic_reasonType")
    private Long reasonTypeId;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("异常原因名称")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "name")
    private String name;

    @Size(max= 500,message="编码长度不能超过500")
    @ApiModelProperty("异常描述")
    @Length(max= 500,message="编码长度不能超过500")
    @TableField(value = "remark")
    private String remark;






}

